function J = costFunctionJ(X, y, theta)

% X 训练集
% y 标签

m = size(X, 1);
predictions = X * theta;
sqrErrors = (predictions - y) .^2;
J = 1 / (2*m) * sum(sqrErrors); 